package wzc.design_pattern.behaviour.strategy;

/**
 * @Author 那和不是个啥
 * @Date 2025/7/20
 * @Description
 */

public class ShoppingCart {
    private PaymentStrategy paymentStrategy;

    public void setPaymentStrategy(PaymentStrategy paymentStrategy) {
        this.paymentStrategy = paymentStrategy;
    }

    public void checkout(int amount) {
        paymentStrategy.pay(amount);
    }
}
